/*    */ package com.iris.egrant.web.struts2.tags;
/*    */ 
/*    */ import freemarker.template.Configuration;
/*    */ import freemarker.template.Template;
/*    */ import java.io.Writer;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ import javax.servlet.jsp.JspException;
/*    */ import javax.servlet.jsp.tagext.BodyTagSupport;
/*    */ import org.springframework.web.context.WebApplicationContext;
/*    */ import org.springframework.web.context.support.WebApplicationContextUtils;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class OpinionTag
/*    */   extends BodyTagSupport
/*    */ {
/*    */   private static final long serialVersionUID = -4998435189712967869L;
/* 26 */   private String category = "";
/* 27 */   private String grantCode = "";
/* 28 */   private String buttonClass = "button_01";
/* 29 */   private String buttons = "";
/* 30 */   private String showGrant = "true";
/*    */ 
/*    */   
/*    */   public int doStartTag() throws JspException {
/* 34 */     WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(this.pageContext.getServletContext());
/*    */ 
/*    */     
/* 37 */     Configuration cptFreemarkereConfiguration = (Configuration)context.getBean("cptFreemarkereConfiguration");
/*    */     
/*    */     try {
/* 40 */       String res = (String)this.pageContext.getAttribute("res");
/* 41 */       String ctx = (String)this.pageContext.getAttribute("ctx");
/* 42 */       Map<String, Object> rootMap = new HashMap<String, Object>();
/* 43 */       rootMap.put("res", res);
/* 44 */       rootMap.put("ctx", ctx);
/* 45 */       rootMap.put("buttons", this.buttons);
/* 46 */       rootMap.put("category", this.category);
/* 47 */       rootMap.put("grantCode", this.grantCode);
/* 48 */       rootMap.put("buttonClass", this.buttonClass);
/* 49 */       rootMap.put("showGrant", this.showGrant);
/* 50 */       Template template = cptFreemarkereConfiguration.getTemplate("opinion.ftl", "utf-8");
/*    */       
/* 52 */       template.process(rootMap, (Writer)this.pageContext.getOut());
/*    */     }
/* 54 */     catch (Exception e) {
/* 55 */       throw new JspException(e);
/*    */     } 
/*    */     
/* 58 */     return 0;
/*    */   }
/*    */   
/*    */   public String getCategory() {
/* 62 */     return this.category;
/*    */   }
/*    */   
/*    */   public void setCategory(String category) {
/* 66 */     this.category = category;
/*    */   }
/*    */   
/*    */   public String getGrantCode() {
/* 70 */     return this.grantCode;
/*    */   }
/*    */   
/*    */   public void setGrantCode(String grantCode) {
/* 74 */     this.grantCode = grantCode;
/*    */   }
/*    */   
/*    */   public String getButtonClass() {
/* 78 */     return this.buttonClass;
/*    */   }
/*    */   
/*    */   public void setButtonClass(String buttonClass) {
/* 82 */     this.buttonClass = buttonClass;
/*    */   }
/*    */   
/*    */   public String getButtons() {
/* 86 */     return this.buttons;
/*    */   }
/*    */   
/*    */   public void setButtons(String buttons) {
/* 90 */     this.buttons = buttons;
/*    */   }
/*    */   
/*    */   public String getShowGrant() {
/* 94 */     return this.showGrant;
/*    */   }
/*    */   
/*    */   public void setShowGrant(String showGrant) {
/* 98 */     this.showGrant = showGrant;
/*    */   }
/*    */ }


/* Location:              D:\文件kjt\WEB-INF\lib\egrant-core-2.2.20240205.1659.jar!\com\iris\egrant\web\struts2\tags\OpinionTag.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */